package com.csxh;

public class muble {

	public static void main(String[] args) {
					int[] a={1,10,8,5,9,3,2,6,7,4};
					int c=0;
					int b=0;
					for (int i = 1; i < a.length+1; i++) {
						if(a[i-1]<a[i]&&a[i]>a[i+1]){
							c++;
						}else if(a[i-1]>a[i]||(a[i]>a[i+1])){
							b++;
						}
					}
					System.out.println(c);
					System.out.println(b);
			}

}


	